package com.woniuxy.rabbitmq83.simple;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * description: Productor <br>
 * date: 2022/1/12 3:48 下午 <br>
 * author: shesaifei <br>
 * version: 1.0 <br>
 */


@Component
public class Comsumer {

    //接收消息
    //queues:指定监听哪些消息队列，只要消息队列中有消息就会自动调用该方法处理
    @RabbitListener(queues = "simple")
    public void receive(String message) {
        System.out.println("1" + message);
    }
}
